﻿using MyLiEda.Events.Common;
using System;

namespace MyLiEda.Events.Bus
{
    public sealed class EventQueue
    {
        public event System.EventHandler<EventProcessedEventArgs> EventPushed;

        public void Push(IEvent @event)
        {
            this.OnEventPushed(new EventProcessedEventArgs(@event));
        }

        private void OnEventPushed(EventProcessedEventArgs e) => this.EventPushed?.Invoke(this, e);
    }
}
